package com.framework.modules.base.service;

import com.baomidou.mybatisplus.service.IService;
import com.framework.common.utils.PageUtils;
import com.framework.modules.base.entity.UserDoingEntity;

import java.util.List;
import java.util.Map;

/**
 * 用户行为表 
 *
 * @author MIT
 * @email litmiss@gmail.com
 * @date 2020-10-23 15:11:22
 */
public interface UserDoingService extends IService<UserDoingEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询是否存在
     * @param entity
     * @return
     */
    Boolean isExist(UserDoingEntity entity);

    /**
     * 添加喜欢
     * @param entity
     * @return
     */
    Integer addDoing(UserDoingEntity entity);

    /**
     * 删除关注或喜欢
     * @param entity
     * @return
     */
    Integer deleteDoing(UserDoingEntity entity);

    /**
     * 获得两个字段
     * @param uid
     * @param otherUid
     * @return
     * isLike 是否喜欢
     * isAttent 是否关注
     */
    Map<String,Boolean> getAttentUserAndLikeUser(Long uid,Long otherUid);

    /**
     * 获取我喜欢的人uid
     * @param uid
     * @return
     */
    List<String> getMyLikeUserUid(Integer uid);

    /**
     * 获取我关注的人uid
     * @param uid
     * @return
     */
    List<String> getMyAttentUserUid(Integer uid);

    /**
     * 获取喜欢我的人uid
     * @param uid
     * @return
     */
    List<String> getLikeMeUserUid(Integer uid);
}

